﻿CREATE TABLE [dbo].[tblMonitor_IndexUsage]
(
	[ius_id] INT NOT NULL IDENTITY(1, 1), 
	[ius_sql_starttime] DATETIME NOT NULL, 
	[ius_databaseid] INT NOT NULL,
	[ius_tableid] INT NOT NULL, 
	[ius_indexid] INT NOT NULL, 
	[ius_type] TINYINT NOT NULL, 
	[ius_is_disabled] BIT NOT NULL DEFAULT (0), 
	[ius_user_updates] INT NOT NULL DEFAULT (0), 
	[ius_user_uses] INT NOT NULL DEFAULT (0), 
	[ius_system_updates] INT NOT NULL DEFAULT (0), 
	[ius_system_uses] INT NOT NULL DEFAULT (0), 
	[ius_is_pkey] BIT NOT NULL DEFAULT (0), 
	[ius_data_space_id] INT NOT NULL,
	CONSTRAINT PK_tblMonitor_IndexUsage PRIMARY KEY CLUSTERED (ius_id ASC)
)
GO
CREATE UNIQUE INDEX [IX_tblMonitor_IndexUsage_Unique_Candidate] ON [dbo].[tblMonitor_IndexUsage] 
(
	[ius_sql_starttime], 
	[ius_databaseid],
	[ius_tableid],
	[ius_indexid]
)
GO